﻿using System;
using System.Collections.Generic;
using System.Text;

namespace T.FAS.Runtime.Metadata.Entity
{
    public class MetaDataUpdateSet
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 项目工程分支标识
        /// </summary>
        public string ProjectBranchID { get; set; }
        /// <summary>
        /// 元数据标识
        /// </summary>
        public string MetaDataID { get; set; }
        /// <summary>
        /// 元数据编号
        /// </summary>
        public string MetaDataCode { get; set; }
        /// <summary>
        /// 元数据类型
        /// </summary>
        public string MetaTypeID { get; set; }
        /// <summary>
        /// 元数据版本标识
        /// </summary>
        public string MetaVersionID { get; set; }
        /// <summary>
        /// 元数据变更内容
        /// </summary>
        public string UpdateContent { get; set; }
        /// <summary>
        /// 变更批次
        /// </summary>
        public string BatchID { get; set; }

        public int State { get; set; } = 0;
        public UpdateSetType UpdateSetType { get; set; } = UpdateSetType.Original;
        /// <summary>
        /// biang描述
        /// </summary>
        public string Description { get; set; }
        public string Creator { get; set; }
        public DateTime CreateTime { get; set; }
        public string LastModifier { get; set; }
        public DateTime LastModifyTime { get; set; }
        /// <summary>
        /// 变更项列表（每个人识别）
        /// </summary>
        public List<MetaDataUpdateItem> UpdateItemList { get; set; }
        /// <summary>
        /// 变更后的元数据
        /// </summary>
        public IMetaData MetaData { get; set; }
        public string UserID { get; set; }
        public string UserName { get; set; }
        public string OtherUser { get; set; }
    }
    /// <summary>
    /// 元数据变更类型
    /// </summary>
    public enum UpdateSetType { 
        /// <summary>
        /// 元数据变更产生的变更项
        /// </summary>
        Original = 0,
        /// <summary>
        /// 变更项变更后的结果
        /// </summary>
        Dependency = 1
    }
}